package stream.part3;

import javax.jws.soap.SOAPBinding;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static java.util.Arrays.asList;

public class Demo02 {
    public static void main(String[] args) {
        Stream<List<Integer>> listStream = Stream.of(asList(1, 2), asList(3, 4));

        List<Integer> collect = listStream.flatMap(Collection::stream).collect(Collectors.toList());
        System.out.println(collect);
    }
}
